// curPartSet.cpp: implementation of the CurPartSet class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PhSapp.h"
#include "part.h"
#include "curPartSet.h"
#include "Phsshare.h"
#include "PHSRecentWork.h"
#include "KnownPartSet.h"
#include "PartSort.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CurPartSet::CurPartSet()
{
}

CurPartSet::~CurPartSet()
{

}

void CurPartSet::InitCurPartSet()
{
}

CString CurPartSet::GetCurStandardOfPart(const CString& strPartID)
{	
	ASSERT(GetProjectManager().CurProject());
		
	PartSortProperty * pPSP = 
		GetProjectManager().CurProject()->SPQManager().GetIDQuery().GetCurPSPByID(strPartID);
	
	if(pPSP == NULL)
	{
		ASSERT(pPSP);
		return _T("");
	}
	return pPSP->Standard();
}

void CurPartSet::SetStandard(Standard* pStandard)
{
}

const CString& CurPartSet::GetStandardOfStyle(INT nStyle)
{
	switch(nStyle)
	{
	case ePA:
		return GetRecentWork().PAStandard();
		break;
	case eSA:
		return GetRecentWork().SAStandard();
		break;
	case eCONNECT:
		return GetRecentWork().ConnectStandard();
		break;
	case eSPRING:
		return GetRecentWork().SpringStandard();
		break;
	case eCONSTSPRING:
		return GetRecentWork().ConstSpringStandard();
		break;
	case eBOLTNUT:
		return GetRecentWork().BoltNutStandard();
		break;
	case eATTACH:
		return GetRecentWork().AttachStandard();
		break;
	case eSTEEL:
		return GetRecentWork().ProfiledBarStandard();
		break;
	default:
		ASSERT(FALSE);
	}
	return GetRecentWork().PAStandard();
}